Skip to content

CI: אימות metadata של חבילות hosted ב־lockfile בהתאם ל־Dart pub - #4565

Merged
Y-PLONI merged 4 commits into
devfrom
palmoni5/guard-hosted-lockfile-metadata-20261108
Nov 9, 2026
Merged

Y-PLONI merged 4 commits into
devfrom
palmoni5/guard-hosted-lockfile-metadata-20261108

Conversation

@palmoni5

@palmoni5 palmoni5 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

ב־#4515 נוצרה רשומת flutter_markdown_plus עם description.name: flutter_markdown. מדיניות Lockfile Guard הקיימת עברה, אך flutter pub get --enforce-lockfile נכשל לפני הבנייה.

ה־PR מוסיף job נפרד ומהיר, עם Python stdlib בלבד, שבודק זהות וגרסה של חבילות hosted ב־pubspec.lock לפני הורדת Flutter או הרצת build hooks. מדיניות שינויי התלויות הקיימת נשמרת. חבילות git/path/sdk אינן כפופות לבדיקת זהות hosted.

בדיקת הגרסה תואמת לתחביר של pub_semver, כולל אפסים מובילים ש־Dart pub מקבל ומשמר. בדיקת רגרסיה חדשה נכשלת מול הביטוי הקודם ועוברת עם התיקון; גם סיומות prerelease/build חוקיות ובלתי חוקיות מכוסות. זה checker מצומצם לפורמט lockfile של הפרויקט, ולא parser כללי או תחליף ל־flutter pub get --enforce-lockfile.

אימות מקומי לאחר rebase על dev@56cd3ac3f3:

  • flutter pub get --enforce-lockfile ו־flutter analyze --no-pub עברו, ללא issues.
  • 14 בדיקות יחידה עברו ב־Python 3.9.6 וב־3.14.3.
  • actionlint .github/workflows/lockfile_guard.yml, בדיקת ה־lockfile הנוכחי ו־git diff --check עברו.
  • 4,332 מקרי גרסה הושוו ל־Version.parse של pub_semver 2.2.0: התאמה מלאה אחרי התיקון, לעומת 610 הבדלים לפניו.
  • שרת hosted מקומי אמיתי סיפק תשע גרסאות, כולל 01.02.03 וסיומות עם אפסים מובילים: dart pub get, --enforce-lockfile וה־checker עברו בכל תשעת המקרים ב־Dart 3.13.5.
  • ה־lockfile ההיסטורי השגוי של build: migrate from discontinued flutter_markdown to flutter_markdown_plus #4515 ב־700d8c84 נדחה; הגרסה המתוקנת ב־38c8ac45 התקבלה.
  • לא הורצו בדיקות Flutter שאינן קשורות לשינוי Python/CI זה.

נבדקו 62 PR פתוחים: אין PR נוסף החופף לשלושת הקבצים שבשינוי. לא בוצע מיזוג. אין המתנה ל־CI במסגרת האימות המקומי.

ה־pre-commit המקומי נכשל בזיהוי SDK כ־0.0.0-unknown בזמן flutter pub run dart_pre_commit; לצורך commit זה בלבד דולג ה־hook לאחר השלמת האימותים הידניים שלעיל. אין שינוי ב־hook או ב־Git config.

@palmoni5
palmoni5 marked this pull request as ready for review November 8, 2026 15:58

palmoni5 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

Independent QA — hosted lockfile metadata

Merged the latest dev@02923a7293 into the PR branch; commit 307df99baa890c0ba054acc1a71fa271fd52b4d7. Retained a separate, narrow PR from Markdown migration.

A fresh negative-test review found that the previous validator incorrectly failed a lockfile with only git, path, or sdk packages, accepted a malformed hosted version such as nonsense, and accepted name when it appeared under another nested mapping instead of description. All three cases are fixed and tested. Added cases for valid pre-release/build versions and a mixed source lockfile. Non-hosted packages are never checked as hosted packages.

Verified: Lockfile Guard run 42525354745 is green on the new head. Its logs report 13 tests passed, followed by successful validation of the existing pubspec.lock. This is separate from Flutter Tests run 42525354813, which is still in queue at the time of this comment.

Merge decision: the hosted-metadata implementation is QA-approved on its own merits, conditional on CI policy and any remaining required checks. No merge performed.

@Y-PLONI
Y-PLONI force-pushed the palmoni5/guard-hosted-lockfile-metadata-20261108 branch from 307df99 to 6e60287 Compare November 9, 2026 07:27
@palmoni5 palmoni5 changed the title CI: אימות שם וגרסת hosted ב־pubspec.lock לפני build CI: אימות metadata של חבילות hosted ב־lockfile בהתאם ל־Dart pub Nov 9, 2026
@Y-PLONI
Y-PLONI force-pushed the palmoni5/guard-hosted-lockfile-metadata-20261108 branch from 90a1c3a to 036f827 Compare November 9, 2026 07:34
@Y-PLONI
Y-PLONI merged commit 757c2a0 into dev Nov 9, 2026
2 checks passed
@Y-PLONI
Y-PLONI deleted the palmoni5/guard-hosted-lockfile-metadata-20261108 branch November 9, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants